var routes = [
	{
		name: 'clearSession',
		method: 'get',
		url: '/clearSession',
		controller: function (req, res, next) {
			req.session = null;

//            req.session.destroy();
			res.send(req.session);
		}
	},
	{
		name: 'index',
		method: 'get',
		url: '/mstores/weixin/connect',
		controller: require('../controllers/IndexController').index
	},
	{
		name: 'memberInfo',
		method: 'get',
		url: '/stores/:storeId/member/info',
		controller: require('../controllers/memberController').info
	},
	{
		name: 'memberAccountList',
		method: 'get',
		url: '/api/member/:id/account',
		controller: require('../controllers/MemberAccountController').accountList
	},
	{
		name: 'memberAccountTx',
		method: 'get',
		url: '/api/member/account/tx/:id',
		controller: require('../controllers/MemberAccountController').getOneAccountTx
	},
	{
		name: 'memberPointsList',
		method: 'get',
		url: '/api/member/:id/points',
		controller: require('../controllers/MemberPointsController').pointsList
	},
	{
		name: 'memberPointsTx',
		method: 'get',
		url: '/api/member/points/tx/:id',
		controller: require('../controllers/MemberPointsController').getOnePointsTx
	},
	{
		name: 'storeIndex',
		method: 'get',
		url: '/stores/:id',
		controller: require('../controllers/storeController').index
	},
	{
		name: 'getBindMember',
		method: 'get',
		url: '/api/stores/:id/bindMember',
		controller: require('../controllers/BindMemberController').getBindMember
	},
	{
		name: 'unBindMember',
		method: 'delete',
		url: '/api/bindMember/:id',
		controller: require('../controllers/BindMemberController').unBindMember
	},
	{
		name: 'getBindMember',
		method: 'get',
		url: '/api/stores/:id/wechat/openid',
		controller: require('../controllers/BindMemberController').getOpenId
	},
	{
		name: 'getMemberBindList',
		method: 'get',
		url: '/api/stores/:storeId/member/:id/bindlist',
		controller: require('../controllers/BindMemberController').getMemberBindList
	},
	{
		name: 'memberInfo',
		method: 'get',
		url: '/api/member/:id',
		controller: require('../controllers/memberController').memberInfo
	},
	{
		name: 'getPayReq',
		method: 'get',
		url: '/api/member/:id/payreq',
		controller: require('../controllers/memberController').getPayReq
	}, {
		name: 'updatePayReq',
		method: 'put',
		url: '/api/member/:id/payreq/:reqId',
		controller: require('../controllers/memberController').updatePayReq
	},
	{
		name: 'memberPassword',
		method: 'put',
		url: '/api/member/:id/changepassword',
		controller: require('../controllers/memberController').changePassword
	},
	{
		name: 'memberOneInfo',
		method: 'get',
		url: '/api/member/:id/one',
		controller: require('../controllers/memberController').memberOneInfo
	},
	{
		name: 'merchantOne',
		method: 'get',
		url: '/api/stores/:id/merchant/one',
		controller: require('../controllers/MerchantController').getMerchantOne
	},
	{
		name: 'memberOrders',
		method: 'get',
		url: '/api/member/:id/orders',
		controller: require('../controllers/MemberOrdersController').getMemberOrders
	},
	{
		name: 'orderInfo',
		method: 'get',
		url: '/api/orders/:id',
		controller: require('../controllers/MemberOrdersController').getOrderInfo
	},
	{
		name: 'sendSMS',
		method: 'post',
		url: '/stores/:storeId/member-bind/send-sms',
		controller: require('../controllers/memberController').sendSMS
	},
	{
		name: 'bind',
		method: 'post',
		url: '/stores/:storeId/member-bind/bind',
		controller: require('../controllers/memberController').bind
	},
	{
		//获取会员快捷支付码
		name: 'verifyCode',
		method: 'post',
		url: '/stores/:storeId/member-pay/:memberId/verifyCode',
		controller: require('../controllers/MemberVerifyCodeController').createNew
	},
	{
		//获取会员快捷支付码成功的支付信息
		name: 'payment',
		method: 'get',
		url: '/stores/:storeId/member-pay/:memberId/payment',
		controller: require('../controllers/MemberVerifyCodeController').getPayment
	},
	{
		//获取会员注册码
		name: 'sendSms',
		method: 'post',
		url: '/stores/:storeId/member-register/send-sms',
		controller: require('../controllers/MemberRegisterController').sendSms
	},
	{
		//获取会员注册码
		name: 'getStoreConfig',
		method: 'get',
		url: '/stores/:storeId/config',
		controller: require('../controllers/storeController').getStoreConfig
	},
	{
		//注册会员
		name: 'register',
		method: 'post',
		url: '/stores/:storeId/member-register',
		controller: require('../controllers/MemberRegisterController').register
	}
];

module.exports = routes;